package com.chongdingxiang;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class ChongdingxiangV1 extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("chongdingxiangv1");
        //服务器内部转发
//        req.getRequestDispatcher("/chongdingxiangv2").forward(req,resp);

        //客户端外部重定向
        resp.sendRedirect("chongdingxiangv2");
    }
}
